﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace AppBlank.Pages
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class VideoListViewPage : ContentPage
    {
        ViewModels.VideoListViewPageViewModel viewModel;
        public VideoListViewPage()
        {
            InitializeComponent();
            BindingContext = viewModel = new ViewModels.VideoListViewPageViewModel(); 

     }

        //LoadVideo

        async void LoadList_Clicked(object sender, EventArgs e)
        {
            MessagingCenter.Send(this, "LoadVideo");
        }


        private void OnCarouselPositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            //var currentView =viewModel.views[e.NewValue];

            //if (currentView is IAnimatedView animatedView)
            //{
            //    animatedView.StartAnimation();
            //}
        }
    }
}